package com.sc.nft.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallUserActivitySummary;
import com.sc.nft.mapper.MallUserActivitySummaryMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;

/**
 * IP商城活动兑换配置表(sc_mall_activity_exchange)数据DAO
 *
 * @author zxy
 * @since 2023-05-10 16:59:01
 * @description IP商城
 */
@Slf4j
@Repository
public class MallUserActivitySummaryDao extends ServiceImpl<MallUserActivitySummaryMapper, MallUserActivitySummary> {

    /**
     * 累计消费金额
     * @param userId
     * @param consumptionAmount
     */
    public void updateTotalConsumptionAmount(Long userId, BigDecimal consumptionAmount) {
        baseMapper.updateTotalConsumptionAmount(userId, consumptionAmount);
    }

    /**
     * 累计兑换金额
     * @param userId
     * @param exchangeAmount
     */
    public void updateTotalExchangeAmount(Long userId, BigDecimal exchangeAmount) {
        baseMapper.updateTotalExchangeAmount(userId, exchangeAmount);
    }



}